package com.cxyxj.aopannon;

import com.cxyxj.aopannon.xx.yy.a;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class AppTest {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppMain.class);
        UserController bean = context.getBean(UserController.class);
        String cxyxj = bean.addUser("cxyxj");
        System.out.println("方法返回值为 = " + cxyxj);

        a bean2 = context.getBean(a.class);
        bean2.a("xx");

        User1Controller bean3 = context.getBean(User1Controller.class);
        bean3.addUser("cxyxj","hhhh");
    }
}
